package cn.snow.boot.listener;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * @author liuwanxiang
 * @version 2018/09/13
 */
@Component
public class PhoneListener implements MessageListener {

    @Override
    public void onMessage(Message message, byte[] bytes) {
        System.out.print(new String(bytes));
        System.out.print(" <===> ");
        System.out.println(new String(message.getBody()));
    }

}
